package com.java.eight.stream;

import java.io.Serializable;

/**
* @description: 碟
* @author: xiaoliang.liu
* @date: 2018/7/8 15:53
* @version v1.0
*/
public class Dish implements Serializable {
    private static final long serialVersionUID = -1491283635187762180L;

    private final String name;
    private final boolean vegetarian;
    private final int calories;
    private final Type type;

    public Dish(String name, boolean vegetarian, int calories, Type type) {
        this.name = name;
        this.vegetarian = vegetarian;
        this.calories = calories;
        this.type = type;
    }
    public String getName() {
        return name;
    }
    public boolean isVegetarian() {
        return vegetarian;
    }
    public int getCalories() {
        return calories;
    }
    public Type getType() {
        return type;
    }
    @Override
    public String toString() {
        return name;
    }

    public enum Type { MEAT, FISH, OTHER }
}
